From: Chad Date: Tue, 6 Jan 2015 18:50:14 +0000 (+0000) Subject: Revert "Keep backend param to search API as long as there's a backend" X-Git-Tag: 1.31.0-rc.0~12784^2 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=a04e11786c27bac6bc454ab3b7906ceb38a06527;p=lhc%2Fweb%2Fwiklou.git Revert "Keep backend param to search API as long as there's a backend" Actually on second thought, having the parameter disappear is a better option than keeping it around with only one possible value. This reverts commit 7a79b017a03c78ddc0b8bf8762346957bef71936. Change-Id: Ia67fa1425e0aa1ee95e0a1733f89d29f94f1eeee --- diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 51f799a251..16a491e566 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -332,7 +332,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { ); $alternatives = SearchEngine::getSearchTypes(); - if ( count( $alternatives ) > 0 ) { + if ( count( $alternatives ) > 1 ) { if ( $alternatives[0] === null ) { $alternatives[0] = self::BACKEND_NULL_PARAM; }